﻿using AutoMapper;
using ERPSystem.Common.Domains.Delivergoods;
using ERPSystem.Common.Domains.PurchaseInvoiceCommon;
using ERPSystem.Common.Domains.Notices;
using ERPSystem.Common.Domains.ReturnNotice;
using ERPSystem.Common.Domains.SalesOrderCommom;
using ERPSystem.Common.Domains.supplier;
using SalesManagementWrite.API.OutOfStock;
using SalesManagementWrite.API.SalesManagementWrites.BillingInvoicing;
using SalesManagementWrite.API.SalesManagementWrites.Deliverynotice;
using SalesManagementWrite.API.SalesManagementWrites.PurchaseInvoicees;
using SalesManagementWrite.API.SalesManagementWrites.ReturnNotices;
using SalesManagementWrite.API.SalesManagementWrites.SalesOrders;

namespace SalesManagementWrite.API.SalesManagementWriteAutoMappers
{
    public class SalesManagementWriteAutoMapper:Profile
    {
        public SalesManagementWriteAutoMapper()
        {
            //创建销售订单新增的映射，由新增销售订单的入参转换为销售订单实体
            CreateMap<SalesOrderCreateCommand, SalesOrder>();
            //新增发货通知单
            CreateMap<DeliverynoticeCreateCommon, Shippingnote>();
            CreateMap<PurchaseInvoiceCreateCommand,PurchaseInvoice>();
            CreateMap<PurchaseInvoiceCreateCommand,PurchaseInvoiceSubtable>();
            //新增销售订单出库
            CreateMap<SaleOutOfWarehouseCreateCommand, SaleOutOfWarehouse>();  
            //新增开票通知单
            CreateMap<BillingInvoicingCreateCommon, Invoicingmemo>();
        }
    }
}
